<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>RFC 1459</TITLE>
<META NAME="author" CONTENT="Content: J. Oikarinen, D.Reed, HTML: Tatu J. Lund">
<META NAME="keywords" CONTENT="rfc1459 irc internet relay chat protocol">
<META NAME="description" CONTENT="HTML version of internet relay chat protocol (IRC) specification (RFC1459). Material for TUUG club seminary.">
<LINK REV="made" HREF="mailto:f@tuug.org">
</HEAD>

<BODY BGCOLOR="#FFFFE8" TEXT="#7A0818">

<MAP NAME="nav_map">
<AREA SHAPE=RECT HREF="/irchelp/" COORDS="1,1,70,38" ALT="">
<AREA SHAPE=RECT HREF="/irchelp/search_engine.cgi" COORDS="72,1,141,38" ALT="">
<AREA SHAPE=RECT HREF="/irchelp/help.html" COORDS="143,1,212,38" ALT="">
<AREA SHAPE=RECT HREF="/irchelp/mail.cgi" COORDS="214,1,283,38" ALT="">
</MAP>

<CENTER>
<TABLE WIDTH=80%>
<TR>
<TD>

<CENTER>
<FONT SIZE=1>HTML layout by Tatu J. Lund Apr 1997</FONT>
</CENTER>

<TABLE WIDTH=100%>
<TR>
<TD ALIGN=LEFT>
Network Working Group<BR>     
Request for Comments: 1459
</TD>
<TD ALIGN=RIGHT>
J. Oikarinen<BR>
D. Reed<BR>
May 1993
</TD>
</TR>
</TABLE>
<HR NOSHADE>

<A NAME="c3"></A>
<H1>3. IRC Concepts.</H1>

   <P>This section is devoted to describing the actual concepts behind  the
   organization  of  the  IRC  protocol and how the current
   implementations deliver different classes of messages.</P>

<A NAME="fig2"></A>
<PRE>

                          1--\
                              A        D---4
                          2--/ \      /
                                B----C
                               /      \
                              3        E

   Servers: A, B, C, D, E         Clients: 1, 2, 3, 4

                    [ Fig. 2. Sample small IRC network ]
</PRE>

<A NAME="c3_1"></A>
<H2>3.1 One-to-one communication</H3>

   <P>Communication on a one-to-one basis is usually only performed by
   clients, since most server-server traffic is not a result of servers
   talking only to each other.  To provide a secure means for clients to
   talk to each other, it is required that all servers be able to send a
   message in exactly one direction along the spanning tree in order to
   reach any client.  The path of a message being delivered is the
   shortest path between any two points on the spanning tree.</P>

   <P>The following examples all refer to <A HREF="#fig2">Figure 2</A> above.</P>

<DL>
<DT>Example 1:</DT>
     <DD>A message between clients 1 and 2 is only seen by server A, which
     sends it straight to client 2.</DD>

<DT>Example 2:</DT>
     <DD>A message between clients 1 and 3 is seen by servers A & B, and
     client 3.  No other clients or servers are allowed see the message.</DD>

<DT>Example 3:</DT>
     <DD>A message between clients 2 and 4 is seen by servers A, B, C & D
     and client 4 only.</DD>
</DL>

<A NAME="c3_2"></A>
<H2>3.2 One-to-many</H3>

   <DD>The main goal of IRC is to provide a  forum  which  allows  easy  and
   efficient  conferencing (one to many conversations).  IRC offers
   several means to achieve this, each serving its own purpose.</DD>

<A NAME="c3_2_1"></A>
<H3>3.2.1 To a list</H3>

   <P>The least efficient style of one-to-many conversation is through
   clients talking to a 'list' of users.  How this is done is almost
   self explanatory: the client gives a list of destinations to which
   the message is to be delivered and the server breaks it up and
   dispatches a separate copy of the message to each given destination.
   This isn't as efficient as using a group since the destination list
   is broken up and the dispatch sent without checking to make sure
   duplicates aren't sent down each path.</P>

<A NAME="c3_2_2"></A>
<H3>3.2.2 To a group (channel)</H3>

   <P>In IRC the channel has a role equivalent to that of the multicast
   group; their existence is dynamic (coming and going as people join
   and leave channels) and the actual conversation carried out on a
   channel is only sent to servers which are supporting users on a given
   channel.  If there are multiple users on a server in the same
   channel, the message text is sent only once to that server and then
   sent to each client on the channel.  This action is then repeated for
   each client-server combination until the original message has fanned
   out and reached each member of the channel.

   <P>The following examples all refer to <A HREF="#fig2">Figure 2</A>.</P>

<DL>
<DT>Example 4:</DT>
     <DT>Any channel with 1 client in it. Messages to the channel go to the
     server and then nowhere else.</DT>

<DT>Example 5:</DT>
     <DT>2 clients in a channel. All messages traverse a path as if they
     were private messages between the two clients outside a channel.</DT>

<DT>Example 6:</DT>
     <DT>Clients 1, 2 and 3 in a channel.  All messages to the channel are
     sent to all clients and only those servers which must be traversed
     by the message if it were a private message to a single client.  If
     client 1 sends a message, it goes back to client 2 and then via
     server B to client 3.</DT>

<A NAME="c3_2_3"></A>
<H3>3.2.3 To a host/server mask</H3>

   <P>To provide IRC operators with some mechanism to send  messages  to  a
   large body of related users, host and server mask messages are
   provided.  These messages are sent to users whose host or server
   information  match that  of  the mask.  The messages are only sent to
   locations where users are, in a fashion similar to that of channels.</P>

<A NAME="c3_3"></A>
<H2>3.3 One-to-all</H2>

   <P>The one-to-all type of message is better described as a broadcast
   message, sent to all clients or servers or both.  On a large network
   of users and servers, a single message can result in a lot of traffic
   being sent over the network in an effort to reach all of the desired
   destinations.</P>

   <P>For some messages, there is no option but to broadcast it to all
   servers so that the state information held by each server is
   reasonably consistent between servers.</P>

<A NAME="c3_3_1"></A>
<H3>3.3.1 Client-to-Client</H3>

   <P>There is no class of message which, from a single message, results in
   a message being sent to every other client.</P>

<A NAME="c3_3_2"></A>
<H3>3.3.2 Client-to-Server</H3>

   <P>Most of the commands which result in a change of state information
   (such as channel membership, channel mode, user status, etc) must be
   sent to all servers by default, and this distribution may not be
   changed by the client.</P>

<A NAME="c3_3_3"></A>
<H3>3.3.3 Server-to-Server.</H3>

   <P>While most messages between servers are distributed to all 'other'
   servers, this is only required for any message that affects either a
   user, channel or server.  Since these are the basic items found in
   IRC, nearly all messages originating from a server are broadcast to
   all other connected servers.</P>

<HR WIDTH=50% NOSHADE>

<TABLE WIDTH=100% BORDER=0>
<TR>
<TD ALIGN=LEFT><A HREF="chapter2.html"><FONT SIZE=+3>&lt;</FONT></A></TD>
<TD ALIGN=CENTER><A HREF="rfc.html"><FONT SIZE=+3>^</FONT></A></TD>
<TD ALIGN=RIGHT><A HREF="chapter4.html"><FONT SIZE=+3>&gt;</FONT></A></TD>
</TR>
</TABLE>

</TD>
</TR>
</TABLE>
</CENTER>

<HR>
<CENTER>
<!-- navigation bar -->
<IMG SRC="/irchelp/Pix/ihnavbar.gif" WIDTH=285 HEIGHT=40 BORDER=0 USEMAP="#nav_map"
	ALT="-navigational bar-">
<BR><SMALL>
[ <A HREF="/irchelp/">go back</A>
| <a href="/irchelp/search_engine.cgi">search</A>
| <A HREF="/irchelp/help.html">help</A>
| <A HREF="/irchelp/mail.cgi">send email</A> ]
</SMALL>
<P>
</CENTER>

<CENTER><SMALL>
<A HREF="/irchelp/credit.html">all pages &copy; IRCHELP.ORG or original authors</A><BR>
</SMALL></CENTER>

</BODY>
</HTML>
